<#assign module="driver"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/bootstrap-multiselect.css">
<link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
</@override>
<@override name="body">
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
               	 发布通知
            </div>
            <div class="panel-body">
                <form id="submit_form" action="${ctx}/notice/create" class="form-horizontal" method="post">

                    <div class="form-group">
                        <label class="col-sm-3 control-label"></label>
                        <div class="col-sm-6">
                            <font color="red">注：遵守国家有关法律、行政法规和管理规章，请勿发送垃圾、广告、以及其他含有法律，行政法规禁止内容的短信。一经发现，将做封号处理（短信费用不退还）。</font>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label"><em>*</em>内容：</label>
                        <div class="col-sm-6">
                            <textarea class="form-control" id="content" name="content" rows="8" required></textarea>
                            <span>每64个字符（空格也算作一个字符）算作为一条短信，当前显示长度不包含签名，<font color="red">应短信通道要求，系统会在末尾自动加上退订回复TD</font>，最终短信内容将增加签名长度和退订回复TD的长度，已输入<span id="putWords" style="color:red;">0</span>个字符。</span>
                        	<br/>
                        	<font color="red">注1：填写内容时请勿回车换行，否则可能导致发送短信时长度不一致</font>
                        	<br/>
                            <font color="red">注2：若发布方式勾选上应用通知后，以上内容将会在APP语音播报</font>
                        </div>
                    </div>

					<div class="form-group">
						<label class="col-sm-3 control-label"></label>
                        <div class="col-sm-6">
                            <input  type="checkbox" name="writemore" />填写更详细说明
                        </div>
                    </div>

                    <div class="form-group" id="contentMore_div" style="display:none;">
                        <label class="col-sm-3 control-label">详细说明：</label>
                        <div class="col-sm-7">
                            <textarea class="form-control" id="contentMore" name="contentMore" rows="8"></textarea>
                            <span>该详细说明为非必填，填写后会为发送的内容中自动加入该详细说明的网页地址</span>
                        </div>
                    </div>

                    <h4>筛选条件<font color="red">（默认将发送给全部服务人员）</font></h4>
                    <hr/>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">姓名：</label>
                        <div class="col-sm-2">
                            <input class="form-control" type="text" id="name" name="name"/>
                        </div>

                        <label class="col-sm-1 control-label">电话：</label>
                        <div class="col-sm-3">
                            <input class="form-control" type="text" id="phone" name="phone"/>
                        </div>

                        <label class="col-sm-1 control-label">工号：</label>
                        <div class="col-sm-2">
                            <input class="form-control" type="text" id="username" name="username"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">余额少于：</label>
                        <div class="col-sm-2">
                            <input class="form-control" type="text" id="virtual" name="virtual"/>
                        </div>

                        <label class="col-sm-1 control-label">入职时间：</label>
                        <div class="col-sm-3">
                            <div class="input-group">
                                <input type="text" class="form-control" id="startTime" name="startTime">
                                <span class="input-group-addon">到</span>
                                <input type="text" class="form-control" id="endTime" name="endTime">
                            </div>
                        </div>

                        <@shiro.isMainCompany>
                            <label class="col-sm-1 control-label">所属公司：</label>
                            <div class="col-sm-2">
                                <input type="hidden" id="companyName" name="companyName" value=""/>
                                <select class="form-control" id="companyId" name="companyId" multiple="multiple">
                                    <#list companys as company>
                                        <option value="${company.id}">${company.abbreviation}</option>
                                    </#list>
                                </select>
                            </div>
                        </@shiro.isMainCompany>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">状态：</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">
                                <label style="padding-right:12px;">
                                    <input type="checkbox" name="status" value="1"/> 上线
                                </label>
                                <label style="padding-right:12px;">
                                    <input type="checkbox" name="status" value="2"/> 接单
                                </label>
                                <label style="padding-right:12px;">
                                    <input type="checkbox" name="status" value="3"/> 忙碌
                                </label>
                                <label style="padding-right:12px;">
                                    <input type="checkbox" name="status" value="0"/> 未上线
                                </label>
                                <label style="padding-right:12px;">
                                    <input type="checkbox" name="freeze" value="freeze"/> 冻结
                                </label>
                            </p>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">类型：</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">
                                <label style="padding-right:12px;">
                                    <input type="checkbox" name="type" value="兼职"/> 兼职
                                </label>
                                <label style="padding-right:12px;">
                                    <input type="checkbox" name="type" value="全职"/> 全职
                                </label>
                            </p>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">服务类型：</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">
                                <@daijia>
                                    <label style="padding-right:12px;">
                                        <input type="checkbox" name="jobType" value="daijia"/> 代驾
                                    </label>
                                </@daijia>
                                <@zhuan>
                                    <label style="padding-right:12px;">
                                        <input type="checkbox" name="jobType" value="zhuanche"/> 专车
                                    </label>
                                </@zhuan>
                                <@pao>
                                    <label style="padding-right:12px;">
                                        <input type="checkbox" name="jobType" value="paotui"/> 跑腿
                                    </label>
                                </@pao>
                                <@freight>
                                    <label style="padding-right:12px;">
                                        <input type="checkbox" name="jobType" value="freight"/> 货运
                                    </label>
                                </@freight>
                            </p>
                        </div>
                    </div>

                    <h4>发送方式</h4>
                    <hr/>

                    <div class="form-group">
                        <label class="col-sm-2 control-label"><em>*</em>发送方式：</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">
                                <@shiro.hasPermission name='driversms'>
                                    <label style="padding-right:12px;">
                                        <input type="checkbox" name="sendType" value="sms"/> 短信
                                    </label>
                                </@shiro.hasPermission>
                                <@shiro.hasPermission name='driverappnotice'>
                                    <label style="padding-right:12px;">
                                        <input type="checkbox" name="sendType" value="message"/> 应用通知
                                    </label>
                                </@shiro.hasPermission>
                            </p>
                        </div>
                    </div>

                    <div class="form-group" style="margin-left:10px;">
                        <label class="col-sm-3 control-label"></label>
                        <input id="submit_button" type="submit" class="btn btn-primary" value="发布">
                        <input type="button" class="btn btn-default" onclick="window.location.href = '${ctx}/notice/list';" value="返回">
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
</@override>
<@override name="footer">
<script src="${ctx}/assets/js/bootstrap-multiselect.js"></script>
<script src="${ctx}/assets/kindeditor/kindeditor-all-min.js"></script>
<script src="${ctx}/assets/kindeditor/lang/zh_CN.js"></script>
<script src="${ctx}/assets/js/datepicker.js"></script>
<script src="${ctx}/assets/js/notice/add.js"></script>
<script type="text/javascript">
    $(document).ready(function () {

    });
</script>
</@override>
<@extends name="../layout.ftl"/>
